#include "editsongdialog.h"

EditSongDialog::EditSongDialog(QString number, QString artist, QString album, QWidget *parent) : QDialog(parent)
{
    setWindowTitle("Edit Song");

    numberEdit = new QLineEdit(number, this);
    artistEdit = new QLineEdit(artist, this);
    albumEdit = new QLineEdit(album, this);
    artistLabel = new QLabel("Artist:", this);
    albumLabel= new QLabel("Album:", this);
    numberLabel = new QLabel("Song name:", this);
    okButton = new QPushButton("OK", this);

    QGridLayout* lay = new QGridLayout;
    lay->addWidget(numberLabel, 0, 0);
    lay->addWidget(numberEdit, 0, 1);
    lay->addWidget(artistLabel,1, 0);
    lay->addWidget(artistEdit, 1, 1);
    lay->addWidget(albumLabel, 2, 0);
    lay->addWidget(albumEdit, 2, 1);
    lay->addWidget(okButton, 3, 0);
    setLayout(lay);

    QObject::connect(okButton, SIGNAL(clicked()), this, SLOT(accept()));
}
